package com.silvtar.util;

public class SSPlatform {
    
    public static final int MAC = 1;
    public static final int LINUX = 2;
    public static final int WINDOWS = 3;
    public static final int ANDROID = 4;
    public static final int OTHER = 5;
    
    public static int platform;
    
    
    
    public static int getPlatform() {
        if (System.getProperty("os.name").indexOf("Mac") >= 0) {
            platform = MAC;
        }
        else if (System.getProperty("os.name").indexOf("Windows") >= 0) {
            platform = WINDOWS;
        }
        else if (System.getProperty("os.name").indexOf("Linux") >= 0) {
            if (System.getProperty("os.arch").indexOf("arm") >= 0) {
                platform = ANDROID;
            }
            else {
                platform = LINUX;
            }
        }
        else {
            platform = OTHER;
        }
        return platform;
    }
}
